package com.san.hkhospital.controller;
import com.san.hkhospital.entity.Position;
import com.san.hkhospital.service.PositionService;
import com.san.hkhospital.service.impl.PositionServiceImpl;
import com.san.hkhospital.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
* (position)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("/position")
public class PositionController {
/**
* 服务对象
*/
@Resource
private PositionServiceImpl positionServiceImpl;

@Autowired
private PositionService positionService;

/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping("selectOne")
public Position selectOne(Integer id) {
return positionServiceImpl.selectByPrimaryKey(id);
}



//职位查询
    @RequestMapping("selectPosition")
    public ResultVO selectposition(){

    return ResultVO.success("查询成功", positionService.selectPosition());
    }


}
